package com.caijg.controller.user;

import com.caijg.domain.vo.Result;
import com.caijg.service.IQuestionService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 问题表--用于体质评估 前端控制器
 * </p>
 *
 * @author caijg
 * @since 2024-12-27
 */
@RestController
@RequestMapping("/user/questions")
@Tag(name = "问题模块")
@Slf4j
public class UserQuestionController {

    @Autowired
    private IQuestionService questionService;

    @Operation(summary = "获取问题列表")
    @GetMapping()
    public Result getQuestions() {
        log.info("用户请求获取问题列表");
        return Result.success(questionService.list());
    }
}